FROM zlqm/python-web:latest
RUN apt-get update && \
    apt-get install -y tzdata && \
    echo "Asia/Shanghai" > /etc/timezone && \
    dpkg-reconfigure -f noninteractive tzdata && \
    apt-get clean && \
    rm -rf /etc/service/cron /etc/service/sshd && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV TZ="Asia/Shanghai"

COPY requirements /tmp/requirements/
RUN ln -s python3.8 python38 && \
    pip3.8 install -r /tmp/requirements/prd.txt -i https://pypi.douban.com/simple && \
    apt-get clean && \
    rm -rf /etc/service/cron /etc/service/sshd && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
